<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Select a location_{$webname}</title>
<meta name="keywords"    content="{$keywords}">
<meta name="description" content="{$description}">
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--公共样式结束-->
<!--页面样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_address.css" />
<!--页面样式结束-->
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery.SuperSlide.2.1.1.js"></script>
</head>

<body>
<div class="zhezhao"></div>
<div class="zz">
	<!--top start-->
	<include file="Public:header" lang="true" />
	<!--top end-->
	<!--content start-->
	<div class="content">
		<div class="buzou clearfix">
			<div class="buzou_left clearfix">
				<dl class="hover">
					<dt>1.Select a location</dt>
					<dd><a href="{:U('Index/address')}"></a></dd>
				</dl>
				<dl>
					<dt>2.Restaurant</dt>
					<notempty name="city.adds">
						<dd><a href="{:U('Restaurant/index')}"></a></dd>
					<else />
						<dd><a ></a></dd>
					</notempty>
				</dl>
				<dl>
					<dt>3.Choose dishes</dt>
					<dd><a ></a></dd>
				</dl>
				<dl>
					<dt>4.Confirm Order</dt>
					<dd><a ></a></dd>
				</dl>
				<dl>
					<dt>5.Complete order</dt>
					<dd><a ></a></dd>
				</dl>
			</div>
			<div class="buzou_right">
				<a href="http://vipwebchat.tq.cn/pageinfo.jsp?version=vip&admiuin=9632675&ltype=100&iscallback=0&page_templete_id=79615&is_message_sms=0&is_send_mail=0&action=acd&acd=1&type_code=1" target=_blank><img src="http://float2006.tq.cn/staticimg.jsp?version=vip&admiuin=9632675&ltype=100&action=acd&acd=1&type_code=1&onlinepic=http://userfiles.tq.cn/userfiles/upload_163/9632675/1411565972.png&offlinepic=http://userfiles.tq.cn/userfiles/upload_163/9632675/1411628431.png" border='0' /></a>
			</div>
		</div>
		<!--address start-->
		<div class="address">
			<h1 class="color_main">You have selected the city：<em>{$city.encity}
			<!-- <notempty name="city.adds">
				</em><br/>The system detects your location :<em id="address"> {$city.enadds}</em>
			</notempty> -->
			</h1>
			<!--<h2>Please enter the first few phonetic alphabet of your hotel,  residential apartment building or road names, and then you can select from a drop-down menu.</h2>-->
			<div class="address_btn">
				<!-- <php>if($city['pointlng']&&$city['adds']){</php>
					<span class="sure"><a href="{:U('Restaurant/index')}">Select the correct address</a></span>
				<php>}</php> -->
				<span class="incorrect incorrect1" id="incorrect1">Manually input your address</span>
				<!--  <span class="incorrect incorrect2" id="incorrect2">
					<a href="{:U('Url/lbs')}" target="aa">Locate your address on the map</a>
				</span>-->
				<span class="incorrect" id="incorrect3">
					<a href="{:U('Index/index')}">Return to choose a city</a>
			</div>
			<span id="iframetips" style="font-size:12px;display:none">Tips: If you can't read the map, please call our hotline for help:400-020-1717</span>
			<div class="iframe">
				<iframe src="{:U('Url/lbs')}" name="aa" frameborder="0" scrolling="No" noresize="noresize" id="topFrame" width="100%" height="350"></iframe>
			</div>
			<h3 class="addressin">
				<span style="font-size:12px">Tips: please input the first few letters of your street name or building name, and choose it from the list.</span><br/>
				<input id="" type="text" placeholder="please enter a keyword, for example: Pattaya , or Liyawan" class="addressinput"  autocomplete="off" onKeyUp="showAddress()" />
				<span class="noaddress"></span>
			</h3>
			<div class="addressdl">
				<dl>
					<dd><span></span></dd>
					<dd class="ditu"><img src="{$NOW_THEME_URL}/Assets/Images/ditusearch.png"/><em></em></dd>
				</dl>
			</div>
			<div class="address_choose">
				<p>You have choosen:</p>
				<p><em>Building:</em><span class="addressspan"></span></p>
				<input type="hidden" id="addid" class="addid" value=""/>
				<h3>If that is correct, please press "Confirm" below</h3>
				<a id="href_1" class="bg_main">Confirm</a>
			</div>
		</div>
		<!--address end-->
	</div>
	<!--content end-->
	
	<!--footer start-->
	<include file="Public:footer" lang="true" />
	<!--footer end-->
	<!--online start-->
		
	<!--online end-->
</div>
<div class="cityck">
	<h1>You haven't select the correct address, click the button to choose the address</h1>
	<h3><a href="{:U('Index/index')}" class="ck">To choose the city</a></h3>
</div>	
<script type="text/javascript">
	//返回顶部
	$(window).on('scroll',function(){
		var scrollTop = $(document).scrollTop();
	});
	
	$(function(){		
		//悬浮框显示隐藏
		$('.online').on('hover',function(){
			$('.online ul').toggle();
			//$('.rlico').toggleClass('rlico2');
		});
		
		<notempty name="noneCity">
			$('.cityck').show();
			$('.zhezhao').show();
		</notempty>
		
		$('.addressin').show();
		
		//弹出地址输入框
		$('.incorrect1').on('click',function(){
			var ads = $('.addressinput').val();
			
			if(ads){
				$('.address_choose').show();
			}
			$('.addressin').show();
			$('.iframe').hide();
			$('#iframetips').hide();
		});
		
		//弹出地图
		$('.incorrect2').live('click',function(){
			$('#incorrect1').show();
			$('.iframe').show();
			$('#iframetips').show();
			$('.addressin').hide();
			$('.addressdl').hide();
			$('.address_choose').hide();
		});
		
		$("#href_1").on('click',function(){
			var adds  = $('.addressspan').html();
			var addid = $('#addid').val();
			
			$.get("{:U('Index/adds')}",{adds:adds,addid:addid},function(){
				window.location.href="index.php?s=Restaurant/index";
			})
		});	
	});
	
	function showAddress(){
		var value = $('.addressinput').val();
		if(value){
			$.get("{:U('Index/address')}",{value:value},function(data){
				
				if(data){
					$('.noaddress').html("");
					$('.addressdl dl').html(data);
					$('.addressdl').slideDown();
					
					$('.addressdl dl dd span').click(function(){
						var html  = $(this).text();
						var addid = $(this).attr("did"); 

						$('.addressinput').val(html);
						$('.addressspan').html(html);
						$('.addid').val(addid);
						
						$('.addressdl').slideUp(function(){
							$('.address_choose').slideDown();
						});
					});
				}else{
					//var btn  = "<span class=\"incorrect incorrect2\"  id=\"incorrect2\"><a href=\"{:U('Url/lbs')}\" target=\"aa\">Select the address by map</a></span>";
					//var html = "No find the appropriate address，You can "+btn;
					var html = 'Sorry, your address is temporarily unfound. You can try by reducing the keywords of your address into one or a couple of it.For example, you can try "Ascott" in the left-hand address blank, if your address is Room 1105, Ascott Raffles City, No.1-2 South Jianguomen Street，Chaoyang District，Beijing,  then select "Ascott" and confirm it in the drop-down list. Otherwise, please click the upper right-hand "online support" button or call our hotline 4000201717 for help.';
					$('.noaddress').html(html);
					$('.addressdl').slideUp();
					$('.address_choose').slideUp();
				}
			});
		}else{
			$('.addressdl').slideUp();
			return false;
		}
	}
</script>
</body>
</html>
